class CreateTickets < ActiveRecord::Migration
  def change
    create_table :tickets do |t|
      t.integer  :parent_id   # Parent id for nestedset
      t.integer :lft  # left child
      t.integer :rgt  # right child
      t.integer :user_id # user (support) id
      t.integer :client_id # user (client) id
      t.integer :department_id
      t.string :title # title for ticket
      t.text :question # message question for ticket
      t.text :answer # message answer for ticket
      t.timestamps
    end
  end
end
